Skip to content

Add backup riders feature - #442

Merged
mveytsman merged 11 commits into
mainfrom
feat/backup-riders
Sep 3, 2025
Merged

Add backup riders feature#442
mveytsman merged 11 commits into
mainfrom
feat/backup-riders

Conversation

@teesloane

@teesloane teesloane commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

Describe your changes

This PR implements a backup-rider system for delivery campaigns. The feature allows dispatchers to add backup riders who can be quickly converted to regular riders if needed, and prevents backup riders from signing up for specific tasks.

Product update: When this code merges, It will be possible for riders to sign up as a backup rider on the campaign signup page. For Dispatchers, backup riders will be visible in the campaign rider list, where they can be messaged, or converted to regular riders.

Notes

Database Schema Changes

  • Migration: Added backup_rider boolean field to campaigns_riders table with proper defaults
  • Model Updates: Updated CampaignRider schema to include the new field in changesets
  • Query Modifications: Properly filters backup riders from regular rider queries

UI/UX Changes

  • Campaign Show Page: Added backup riders section with clear visual distinction
  • Signup Page: Prevents backup riders from signing up for tasks with helpful messaging
  • Task Assignment: Backup riders cannot be assigned tasks, with clear UI feedback
  • Conversion Flow: Easy one-click conversion from backup to regular rider

Test Coverage

  • Comprehensive Tests: 17 new test cases covering all backup rider functionality
  • Edge Cases: Tests prevent duplicate signups, regular/backup conflicts
  • Business Logic: Validates conversion flows and removal operations
  • Integration: Tests UI interactions and data flow

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added tests.
  • Are there other PRs or Issues that I should link to here?
  • Will this be part of a product update? If yes, please write one phrase
    about this update in the description above.

Dispatchers can now view people who have signed up to be backup riders
in the campaign show view. Backup riders can be converted to regular
riders which can then be assigned to tasks.
fetching location is unecessary.
We don't need data-confirmations on the cancelling of backup riders on
same day campaigns, I don't think.
@teesloane teesloane changed the title [DRAFT] Add backup riders feature Add backup riders feature Aug 20, 2025
@teesloane
teesloane requested a review from mveytsman August 20, 2025 13:52
@teesloane
teesloane marked this pull request as ready for review August 20, 2025 13:52

@mveytsman mveytsman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Ship it!

@mveytsman
mveytsman merged commit 1fe3e59 into main Sep 3, 2025
1 check passed
@mveytsman
mveytsman deleted the feat/backup-riders branch September 3, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants